package com.sino.second.dao.hibernate;




import com.sino.second.bean.TblEmailset;
import com.sino.second.dao.IMailSendDAO;
import com.sino.util.page.AbstractPagerManager;
import com.sino.util.page.PagerModel;

public class MailSendDAO extends AbstractPagerManager  implements IMailSendDAO{

	public TblEmailset findEmeilSetById(Integer id) {
		return (TblEmailset)this.getHibernateTemplate().get(TblEmailset.class, id);
	}

	public PagerModel findEmeilSetList(String hqlWhere,String year) {
		String str_SQL="from TblEmailset te where '1'='1'";
		if(hqlWhere.length()>1){
			str_SQL+=" and "+hqlWhere;
		}
	   return this.searchPaginated(str_SQL);
	}

	public void saveOrUpdate(Object o) {
		this.getHibernateTemplate().saveOrUpdate(o);
	}

}
